import xadmin
from xadmin import views
from projs.models import *


class MainDashboard(object):
    widgets=[
       [
            {"type":"html","content": "<h3>欢迎使用配置管理系统</h3>", "title": "Welcome"},
       ]
    ]

class BaseSetting(object):
    enable_themes=True
    use_bootswatch=False#暂时关闭

class GlobalSettings(object):
    site_title='配置管理系统'
    site_footer='配置管理系统'
    global_add_models = [ProjectProduct,]#增加选项
    menu_style='accordion'
    apps_icons = {"projs": "fa fa-sitemap"}


xadmin.site.register(views.website.IndexView,MainDashboard)
xadmin.site.register(views.BaseAdminView,BaseSetting)
xadmin.site.register(views.CommAdminView,GlobalSettings)
